-- GENERATED SPELL FOR [Hathyss the Wicked] --


function spell0_22381(pUnit, Event) --@Curse of Burning Shadows,n/a--
pUnit:FullCastSpellOnTarget(36541,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22381', 558, 1)
end

function spell1_22381(pUnit, Event) --@Rain of Chaos,n/a--
pUnit:FullCastSpellOnTarget(34017,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22381', 9000, 1)
end

function Sorts_22381(pUnit, Event)
local choix_sorts_22381 = math.random(0, 1)
if choix_sorts_22381 == 0 then
pUnit:RegisterEvent('spell0_22381', 1, 1)
end
if choix_sorts_22381 == 1 then
pUnit:RegisterEvent('spell1_22381', 1, 1)
end
end

function mob22381_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22381', math.random(1500, 3000), 1)
end

function mob22381_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22381_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22381_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22381, 1, 'mob22381_Action')
RegisterUnitEvent(22381, 2, 'mob22381_Leave')
RegisterUnitEvent(22381, 3, 'mob22381_Kill')
RegisterUnitEvent(22381, 4, 'mob22381_Die')
